package com.sg.dto.integration.pbff.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc BffOpenObjectUsageRelationshipDto
 * @使用场景
 */
@Data
public class BffOpenObjectUsageRelationshipDto implements Serializable {

    /**
     * 开通对象使用关系ID
     */
    @ApiModelProperty("开通对象使用关系ID")
    private String applexRelId;

    /**
     * 开通对象钥匙标识 TENANT_SPACE:租户空间 ORG:组织 EVA_THEME:评价主题 EVA_TEMP:评价模板 PLATFORM:平台
     */
    @ApiModelProperty("开通对象钥匙标识")
    private String applexType;

    /**
     * 开通对象ID
     */
    @ApiModelProperty("开通对象ID")
    private String applexId;

    /**
     * 冗余开通对象名称
     */
    @ApiModelProperty("冗余开通对象名称")
    private String applexName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BffOpenObjectUsageRelationshipDto that = (BffOpenObjectUsageRelationshipDto) o;
        return applexRelId == that.applexRelId && applexType == that.applexType && applexId == that.applexId && applexName == that.applexName;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), applexRelId, applexType, applexId, applexName);
    }

}
